From: Mark Brown Date: Fri, 13 Apr 2012 18:16:03 +0000 (+0100) Subject: ASoC: core: Return -ENOTSUPP instead of -EINVAL if mute is not supported X-Git-Tag: archive/raspbian/4.9.13-1+rpi1~10^2~11008^2~9^2~98 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=04570c628fbd5ede85d87a0b81bd19df7b13bbc4;p=linux-4.9.git ASoC: core: Return -ENOTSUPP instead of -EINVAL if mute is not supported This helps us ignore errors in callers if the operation failed due to not being available as opposed to an error. Signed-off-by: Mark Brown Acked-by: Liam Girdwood --- diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 8a17048dba42..98a4f7aa4f01 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3031,7 +3031,7 @@ int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute) if (dai->driver && dai->driver->ops->digital_mute) return dai->driver->ops->digital_mute(dai, mute); else - return -EINVAL; + return -ENOTSUPP; } EXPORT_SYMBOL_GPL(snd_soc_dai_digital_mute);